<?php
class Tinymce_system extends CI_Controller{
	public function __construct(){
		parent::__construct();
		$this->load->model('model_home');
	}
	
	function tinymce_upload(){
		$data = array();
		if($this->input->post("btnUpload")){
			$config['upload_path'] = './image_tinymce/';
			$config['allowed_types'] = 'gif|jpg|png';

			$this->load->library('upload', $config);
	
			if ( ! $this->upload->do_upload('image'))
			{
				$data = array('error' => $this->upload->display_errors());
			}
			else
			{
				$data = array('error' => $this->upload->data());
			}
		}
		$this->load->view('general/tinymce_upload',$data);
	}
}